<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template linear_slist_algorithms</title>
<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../intrusive/reference.html#doxygen.linear__slist__algorithms_8hpp" title="Header &lt;boost/intrusive/linear_slist_algorithms.hpp&gt;">
<link rel="prev" href="structboost_1_1intrusive_1_1unordered__default__bucket__traits.html" title="Struct template unordered_default_bucket_traits">
<link rel="next" href="link__mode_8hpp_1a78f33f6f20c898563c4449b5cff5d9c3.html" title="Type link_mode_type">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
<td align="center"><a href="../../../index.html">Home</a></td>
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1intrusive_1_1unordered__default__bucket__traits.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive/reference.html#doxygen.linear__slist__algorithms_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="link__mode_8hpp_1a78f33f6f20c898563c4449b5cff5d9c3.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template linear_slist_algorithms</span></h2>
<p>boost::intrusive::linear_slist_algorithms</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../intrusive/reference.html#doxygen.linear__slist__algorithms_8hpp" title="Header &lt;boost/intrusive/linear_slist_algorithms.hpp&gt;">boost/intrusive/linear_slist_algorithms.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> NodeTraits<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html" title="Class template linear_slist_algorithms">linear_slist_algorithms</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span><span class="special">::</span><span class="identifier">node</span>           <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a08202e31b1cdf5b51f6f43206a75e62e"></a><span class="identifier">node</span><span class="special">;</span>          
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span><span class="special">::</span><span class="identifier">node_ptr</span>       <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a38e494a259002b5e8e6d71934c88e3a8"></a><span class="identifier">node_ptr</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span><span class="special">::</span><span class="identifier">const_node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a39c915d78438ecaa5a411192e7e6c371"></a><span class="identifier">const_node_ptr</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">NodeTraits</span>                 <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a7e593c66652027c698e74bff1813e5b6"></a><span class="identifier">node_traits</span><span class="special">;</span>   
  <span class="keyword">typedef</span> <span class="identifier">twin</span><span class="special">&lt;</span> <span class="identifier">node_ptr</span> <span class="special">&gt;</span>           <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a93e136a97cf29bc12d5f37b63e94eced"></a><span class="identifier">node_pair</span><span class="special">;</span>     

  <span class="comment">// <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#id52-bb">public static functions</a></span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a5f2d6db87b6a4fafc2eab8e225ec9cb0"><span class="identifier">init</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1ac4c918c0e16368f8bf51e53b5991be2a"><span class="identifier">unique</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a6c9dccdf4196e2be47c77e9e25ac09a7"><span class="identifier">inited</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1afe3fcce14a80fbd34d4a9f5f96070bae"><span class="identifier">unlink_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a02b0396dacf3c426f8cd855aa6c362a1"><span class="identifier">unlink_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a77a596f873e1232012a2e97f88e4cf5f"><span class="identifier">link_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a9c3bb49bb91783bbacad536311d15619"><span class="identifier">transfer_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1aac8a9fe60b561e00392703551d973b63"><span class="identifier">init_header</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a88310e287ec77dd8239827dd20d1023d"><span class="identifier">end_node</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a530a2440948a8346f10615725f4df2c1"><span class="identifier">is_empty</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">bool</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a97bb619a4ab83419118fffd208c6ea42"><span class="identifier">is_sentinel</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a7b3fea480e4cd8181f28f168062663ce"><span class="identifier">set_sentinel</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1afb95c3db10c4228b0ca03d7fd79dc065"><span class="identifier">get_previous_node</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a767685437411c8f3fa206933fb14b881"><span class="identifier">count</span></a><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a14f72f656bb27e5cbc60de03fceb5602"><span class="identifier">swap_trailing_nodes</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_ptr</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a89865f5a8f52e1f1ececb81b62c666c2"><span class="identifier">reverse</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_pair</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1aa45659ebc0bf46c77482662c16694fa6"><span class="identifier">move_first_n_backwards</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="identifier">node_pair</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a71e31b7b2e886c6728ee9a479bc76d15"><span class="identifier">move_first_n_forward</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">void</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a01185e4c0c410a899cea02f84b258d9d"><span class="identifier">transfer_after</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Disposer<span class="special">&gt;</span> 
    <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html#doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a6047008c64b859796d8c89e77e9955a3"><span class="identifier">detach_and_dispose</span></a><span class="special">(</span><span class="identifier">node_ptr</span><span class="special">,</span> <span class="identifier">Disposer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.17.42.16.3.4"></a><h2>Description</h2>
<p><a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html" title="Class template linear_slist_algorithms">linear_slist_algorithms</a> provides basic algorithms to manipulate nodes forming a linear singly linked list.</p>
<p><a class="link" href="classboost_1_1intrusive_1_1linear__slist__algorithms.html" title="Class template linear_slist_algorithms">linear_slist_algorithms</a> is configured with a NodeTraits class, which encapsulates the information about the node to be manipulated. NodeTraits must support the following interface:</p>
<p><span class="bold"><strong>Typedefs</strong></span>:</p>
<p><code class="computeroutput">node</code>: The type of the node that forms the linear list</p>
<p><code class="computeroutput">node_ptr</code>: A pointer to a node</p>
<p><code class="computeroutput">const_node_ptr</code>: A pointer to a const node</p>
<p><span class="bold"><strong>Static functions</strong></span>:</p>
<p><code class="computeroutput">static node_ptr get_next(const_node_ptr n);</code></p>
<p><code class="computeroutput">static void set_next(node_ptr n, node_ptr next);</code> </p>
<div class="refsect2">
<a name="id-1.3.17.42.16.3.4.11"></a><h3>
<a name="id52-bb"></a><code class="computeroutput">linear_slist_algorithms</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a5f2d6db87b6a4fafc2eab8e225ec9cb0"></a><span class="identifier">init</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Constructs an non-used list element, putting the next pointer to null: <code class="computeroutput">NodeTraits::get_next(this_node) == node_ptr()</code></p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1ac4c918c0e16368f8bf51e53b5991be2a"></a><span class="identifier">unique</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns true is "this_node" is the only node of a circular list: or it's a not inserted node: <code class="computeroutput">return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</code></p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a6c9dccdf4196e2be47c77e9e25ac09a7"></a><span class="identifier">inited</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Returns true is "this_node" has the same state as if it was inited using "init(node_ptr)"</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1afe3fcce14a80fbd34d4a9f5f96070bae"></a><span class="identifier">unlink_after</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: prev_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks the next node of prev_node from the circular list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a02b0396dacf3c426f8cd855aa6c362a1"></a><span class="identifier">unlink_after</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_node<span class="special">,</span> <span class="identifier">node_ptr</span> last_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: prev_node and last_node must be in a circular list or be an empty circular list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks the range (prev_node, last_node) from the linear list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a77a596f873e1232012a2e97f88e4cf5f"></a><span class="identifier">link_after</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_node<span class="special">,</span> <span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: prev_node must be a node of a linear list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Links this_node after prev_node in the linear list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a9c3bb49bb91783bbacad536311d15619"></a><span class="identifier">transfer_after</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">node_ptr</span> b<span class="special">,</span> <span class="identifier">node_ptr</span> e<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: b and e must be nodes of the same linear list or an empty range. and p must be a node of a different linear list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Removes the nodes from (b, e] range from their linear list and inserts them after p in p's linear list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1aac8a9fe60b561e00392703551d973b63"></a><span class="identifier">init_header</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Constructs an empty list, making this_node the only node of the circular list: <code class="computeroutput">NodeTraits::get_next(this_node) == this_node</code>.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a88310e287ec77dd8239827dd20d1023d"></a><span class="identifier">end_node</span><span class="special">(</span><span class="identifier">const_node_ptr</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: 'p' is the first node of a list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns a pointer to a node that represents the "end" (one past end) node</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant time.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a530a2440948a8346f10615725f4df2c1"></a><span class="identifier">is_empty</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Returns true if this_node_points to an empty list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">bool</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a97bb619a4ab83419118fffd208c6ea42"></a><span class="identifier">is_sentinel</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Returns true if this_node points to a sentinel node.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a7b3fea480e4cd8181f28f168062663ce"></a><span class="identifier">set_sentinel</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Marks this node as a "sentinel" node, a special state that is different from "empty", that can be used to mark a special state of the list</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> 
<a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1afb95c3db10c4228b0ca03d7fd79dc065"></a><span class="identifier">get_previous_node</span><span class="special">(</span><span class="identifier">node_ptr</span> prev_init_node<span class="special">,</span> <span class="identifier">node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node and prev_init_node must be in the same linear list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the previous node of this_node in the linear list starting. the search from prev_init_node. The first node checked for equality is NodeTraits::get_next(prev_init_node).</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements between prev_init_node and this_node.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a767685437411c8f3fa206933fb14b881"></a><span class="identifier">count</span><span class="special">(</span><span class="identifier">const_node_ptr</span> this_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node must be in a linear list or be an empty linear list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Returns the number of nodes in a linear list. If the linear list is empty, returns 1.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a14f72f656bb27e5cbc60de03fceb5602"></a><span class="identifier">swap_trailing_nodes</span><span class="special">(</span><span class="identifier">node_ptr</span> this_node<span class="special">,</span> <span class="identifier">node_ptr</span> other_node<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: this_node and other_node must be nodes inserted in linear lists or be empty linear lists.</p>
<p><span class="bold"><strong>Effects</strong></span>: Moves all the nodes previously chained after this_node after other_node and vice-versa.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Constant</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_ptr</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a89865f5a8f52e1f1ececb81b62c666c2"></a><span class="identifier">reverse</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Reverses the order of elements in the list.</p>
<p><span class="bold"><strong>Returns</strong></span>: The new first node of the list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing.</p>
<p><span class="bold"><strong>Complexity</strong></span>: This function is linear to the contained elements. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_pair</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1aa45659ebc0bf46c77482662c16694fa6"></a><span class="identifier">move_first_n_backwards</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> n<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Moves the first n nodes starting at p to the end of the list.</p>
<p><span class="bold"><strong>Returns</strong></span>: A pair containing the new first and last node of the list or if there has been any movement, a null pair if n leads to no movement.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements plus the number moved positions. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="identifier">node_pair</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a71e31b7b2e886c6728ee9a479bc76d15"></a><span class="identifier">move_first_n_forward</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> n<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Effects</strong></span>: Moves the first n nodes starting at p to the beginning of the list.</p>
<p><span class="bold"><strong>Returns</strong></span>: A pair containing the new first and last node of the list or if there has been any movement, a null pair if n leads to no movement.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of elements plus the number moved positions. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">static</span> <span class="keyword">void</span> <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a01185e4c0c410a899cea02f84b258d9d"></a><span class="identifier">transfer_after</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">node_ptr</span> other<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: other must be a list and p must be a node of a different linear list.</p>
<p><span class="bold"><strong>Effects</strong></span>: Transfers all nodes from other after p in p's linear list.</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Disposer<span class="special">&gt;</span> 
  <span class="keyword">static</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> 
  <a name="doxygen.classboost_1_1intrusive_1_1linear__slist__algorithms_1a6047008c64b859796d8c89e77e9955a3"></a><span class="identifier">detach_and_dispose</span><span class="special">(</span><span class="identifier">node_ptr</span> p<span class="special">,</span> <span class="identifier">Disposer</span> disposer<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p><span class="bold"><strong>Requires</strong></span>: "disposer" must be an object function taking a node_ptr parameter and shouldn't throw.</p>
<p><span class="bold"><strong>Effects</strong></span>: Unlinks all nodes reachable from p (but not p) and calls <code class="computeroutput">void disposer::operator()(node_ptr)</code> for every node of the list where p is linked.</p>
<p><span class="bold"><strong>Returns</strong></span>: The number of disposed nodes</p>
<p><span class="bold"><strong>Complexity</strong></span>: Linear to the number of element of the list.</p>
<p><span class="bold"><strong>Throws</strong></span>: Nothing. </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005 Olaf Krzikalla<br>Copyright © 2006-2015 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1intrusive_1_1unordered__default__bucket__traits.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../intrusive/reference.html#doxygen.linear__slist__algorithms_8hpp"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="link__mode_8hpp_1a78f33f6f20c898563c4449b5cff5d9c3.html"><img src="../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
